package com.imooc.miaosha.util;

import org.redisson.Redisson;
import org.redisson.config.Config;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import javax.swing.plaf.PanelUI;

@Component
public class RedissonManage {
    @PostConstruct
    public Redisson init(){
    Config config=new Config();
    config.useSingleServer().setConnectionMinimumIdleSize(10).setAddress("redis://122.112.167.247:6379").setPassword("690313");
        return (Redisson) Redisson.create(config);
}
public Redisson getRedisson(){
    return  init();
}
}
